<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Cache-Control" content="no-transform"/>
    <meta name="applicable-device" content="pc,wap">
    <meta name="MobileOptimized" content="width"/>
    <meta name="author" content="www.bang-dun.com"/>
    <meta name="HandheldFriendly" content="true"/>
    <title>Elegant Mexican Flooring</title>
    <meta name="keywords"
          content="爱丽家居, 墨西哥地板, 高端木质地板, 家居装修, 地板设计, 手工地板, 拉丁风情家,Mexican flooring, high-end wooden flooring, home decoration, floor design, handmade flooring, Latin style home">
    <meta name="description"
          content="En los últimos 20 años, hemos superado pruebas y dificultades. Fundada en noviembre de 1999, ELETILE fue uno de los primeros fabricantes de SUELOS DE VINILO de China.">
    <meta name="author" content="eletile"/>
    <link href="static/css/bootstrap.min.css" rel="stylesheet">
    <!--<link rel="stylesheet" href="static/css/animate.min.css">-->
    <link rel="stylesheet" id="google-fonts-1-css"
          href="https://fonts.googleapis.com/css?family=Nunito+Sans%3A100%2C100italic%2C200%2C200italic%2C300%2C300italic%2C400%2C400italic%2C500%2C500italic%2C600%2C600italic%2C700%2C700italic%2C800%2C800italic%2C900%2C900italic&amp;display=swap&amp;ver=6.5.5"
          media="all">

    <link href="static/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="static/css/swiper.min.css">
    <link rel="stylesheet" href="static/css/css.css?v=1">
    <script src="static/js/jquery01.min.js"></script>
    <!--<script src="static/js/wow.min.js"></script>-->
    <script src="static/js/swiper.min.js"></script>
    <script src="static/js/js.js"></script>
    <link href="static/css/plyr.min.css" rel="stylesheet">
    <script src="static/js/plyr.min.js"></script>
    <script src="static/js/bootstrap.min.js"></script>
    <link href="static/js/viewer.min.css" rel="stylesheet">
    <script src="static/js/viewer.min.js" type="application/javascript"></script>
    <script src="static/js/jquery01.min.js"></script>

    <style>
        .xgplayer-skin-default .xgplayer-definition ul li {
            display: block;
            height: 28px !important;
            width: 100% !important;
        }

        .contact-form {
            max-width: 800px;
            margin: 20px auto;
            padding: 30px;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        }

        .form-title {
            text-align: center;
            color: #282828;
            font-size: 26px;
            margin-bottom: 20px;
            font-weight: 700;
            margin-top: 0;
        }

        .form-subtitle {
            color: #00694e ;
            text-align: center;
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-control {
            border: 1px solid #cccccc;
            padding: 10px;
            border-radius: 4px;
            width: 100%;
        }

        .form-label {
            font-weight: 500;
            margin-bottom: 8px;
            display: block;
            color: #7f7e7e;
            font-size: 16px;
        }

        .required::after {
            content: " (requerido)";
            color: #666;
            font-size: 0.9em;
        }

        textarea.form-control {
            min-height: 150px;
        }

        .submit-btn {
            background-color: #00694e ;
            color: white;
            padding: 12px 30px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
            transition: background-color 0.3s;
        }

        .submit-btn:hover {
            background-color: #2bc59f;
        }

        .contact-image {
            text-align: center;
            margin-bottom: 20px;
        }

        .contact-image img {
            max-width: 100%;
            height: auto;
            border-radius: 4px;
        }

        .form-section {
            margin-bottom: 15px;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            p {
                color: #7f7e7e;
                font-size: 16px;
            }
        }

        .form-section h3 {
            margin: 0;
            color: #00694e;
            font-size: 16px;
            font-weight: 600;
        }

        .form-section.expanded {
            border-color: #00694e ;
        }

        .section-icon {
            display: inline-block;
            margin-right: 10px;
            transition: transform 0.3s;
        }

        .expanded .section-icon {
            transform: rotate(90deg);
        }

        .benefits-container {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 30px;
            margin-bottom: 30px;
        }

        .benefits-list {
            flex: 1;
        }

        .benefits-image {
            flex: 1;
            text-align: center;
        }

        .benefits-image img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        .form-section {
            margin-bottom: 15px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .form-section:hover {
            border-color: #00694e ;
            background-color: #f3fff7;
        }

        .form-section p {
            margin: 10px 0 0 25px;
            color: #666;
            display: none;
        }

        .form-section.expanded p {
            display: block;
        }

        .input-line {
            display: inline-block;
            border-bottom: 1px solid #000; /* 横线 */
            width: 200px; /* 根据需要设置宽度 */
            margin-left: 10px; /* 与 "Otro" 之间的间距 */
        }

        .input-line input {
            border: none; /* 去掉边框 */
            outline: none; /* 去掉焦点样式 */
            width: 100%; /* 输入框宽度 */
            margin-left: -5px; /* 与线重叠 */
        }

        .error {
            border-color: #ff0000 !important; /* 红色边框 */
        }

        .error + .form-label {
            color: #ff0000; /* 红色文字 */
        }
        @media screen and (max-width: 4000px) {
            .form-control-select {
                width: 20%;
            }
        }

        @media screen and (max-width: 768px) {
            .form-control-select {
                width: 40%;
            }
        }
        @media screen and (max-width: 480px) {
            .form-control-select {
                width: 40%;
            }
        }
        .loading {
            position: relative;
            cursor: not-allowed;
        }
        .loading:after {
            content: '';
            position: absolute;
            border: 3px solid #fff;
            border-top-color: transparent;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            animation: spin 1s linear infinite;
            right: 10px; /* 按钮右侧 */
            top: 50%;
            transform: translateY(-50%);
        }
        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }
    </style>
</head>
<body>
<div class="header">
    <div class="container-fluid clearfix">
        <a href="javascript:void(0);" class="menu-btn"><span></span></a>
        <div class="logo img-center" style="height: 50px">
            <a href="index.html" style="display:flex;height: 50px">
                <img src="static/images/MF logo-1.png">
                <span class="img-desc">Elegant Mexican Flooring</span>
            </a>
        </div>
        <ul class="nav">
            <!-- <li><a href="index.html">Inicio</a></li> -->
            <li><i class="arr"></i> <a href="index.html">Acerca de</a>
                <div class="dropdown-box v_list"></div>
            </li>
            <li><i class="arr"></i> <a href="product.html">Productos</a></li>
            <li><i class="arr"></i> <a href="process.html">Proceso</a></li>
            <li><i class="arr"></i> <a href="opportunity.html">Carrera</a></li>
            <li><i class="arr"></i> <a href="FAQ.html">FAQ</a></li>
            <li><i class="arr"></i> <a href="contact.html">Contacto</a></li>
            <!--<li><i class="arr"></i> <a href="#CONTACT">Contact Us</a>-->
            <!--    <div class="dropdown-box v_list"></div>-->
            <!--</li>-->
        </ul>
        <script type="text/javascript">
          $('.nav li').click(function () {
            $('.nav .v_list').slideUp(500)
            $(this).toggleClass('active').siblings('.nav li').removeClass('active')//切换图标
            $(this).children('.nav .v_list').slideToggle(500)
          })

          $('.nav li').each(function () {
            if ($(this).children('.v_list').children('a').length == 0) {
              $(this).children('i').hide()
            }
          })

        </script>
    </div>
</div>

<div class="banner-sub image-wrapper" style="background-image: url(static/images/mx_banner02.jpg);">
    <div class="container">
        <div class="wrap">
            <div class="inner wow zoomIn">
                <h4 style="font-weight: 700;">Contacto</h4>
                <small style="color: #fff;">Conviértase en nuestro distribuidor</small>
            </div>
        </div>
    </div>
</div>

<div class="section"  id="section1">
    <div class="container">
        <div class="contact-form">
            <h2 class="form-title">¿Quieres ser nuestro socio comercial?</h2>
            <h3 class="form-subtitle">Conozca los beneficios</h3>

            <div class="benefits-container">
                <div class="benefits-list">
                    <div class="form-section expanded">
                        <h3><span class="section-icon">-</span> Descuentos</h3>
                        <p>Para obtener los mejores precios optimizados para su proyecto.</p>
                    </div>

                    <div class="form-section">
                        <h3><span class="section-icon">+</span> Entrega más agil</h3>
                        <p>Garantizamos tiempos de entrega más cortos y un servicio prioritario.</p>
                    </div>

                    <div class="form-section">
                        <h3><span class="section-icon">+</span> Propuestas personalizadas</h3>
                        <p>Soluciones adaptadas específicamente a sus necesidades y proyectos.</p>
                    </div>
                </div>

                <div class="benefits-image">
                    <img src="static/images/pic.jpg" alt="Instalación de suelo">
                </div>
            </div>

            <form id="contactForm" action="#" method="POST">
                <div class="form-group">
                    <label class="form-label required">Su nombre</label>
                    <input type="text" class="form-control" name="customerName" required>
                </div>

                <div class="form-group">
                    <label class="form-label required">Tipo de Cliente</label>
                    <div>
                        <label class="form-label">
                            <input type="radio" name="customerType" value="Distribuidor" required>
                            Distribuidor
                        </label>
                        <label class="form-label">
                            <input type="radio" name="customerType" value="Mayorista">
                            Mayorista
                        </label>
                        <label class="form-label">
                            <input type="radio" name="customerType" value="Empresa de Ingeniería / Construcción">
                            Empresa de Ingeniería / Construcción
                        </label>
                        <label class="form-label">
                            <input type="radio" name="customerType" value="Marca o Empresa que busca colaboración">
                            Marca o Empresa que busca colaboración
                        </label>
                        <label class="form-label">
                            <input type="radio" name="customerType" value="Otro" id="customOption" onclick="showCustomInput()">
                            Otro (especificar)
                            <span class="input-line">
                              <input type="text" class="form-control" id="customInput" placeholder="Especificar" style="display: none;">
                            </span>
                        </label>

                    </div>
                </div>

                <div class="form-group">
                    <label class="form-label required">Su correo electrónico</label>
                    <input type="email" class="form-control" name="email" required>
                </div>

                <div class="form-group">
                    <label class="form-label required">Su teléfono</label>

                    <div style="display: flex">
                        <select style="margin-right: 5px;padding: 6px 12px" class="form-control form-control-select" id="country" name="country" required>
                            <option value="MX">México</option>
                            <option value="CN">China</option>
                            <option value="US">Estados Unidos</option>
                            <option value="GB">Reino Unido</option>
                            <!-- 添加更多国家选项 -->
                        </select>
                        <input type="tel" class="form-control" id="phone" name="phone" required >
                    </div>


                </div>

                <div class="form-group">
                    <label class="form-label">Asunto</label>
                    <input type="text" class="form-control" name="theme">
                </div>

                <div class="form-group">
                    <label class="form-label">Su mensaje</label>
                    <textarea class="form-control" name="message"></textarea>
                </div>

                <button type="submit" id="submitButton" class="submit-btn">Enviar</button>
            </form>
        </div>
    </div>
</div>

<div class="footer" id="CONTACT">
    <div class="container clearfix wow fadeInRight">
        <p style="font-size: 20px;font-weight: bold;line-height:30px;margin: 0;">El MF es un orgulloso integrante de
            Eletile que es un fabricante mundial de suelos de alta calidad con más de 20 años de experiencia.</p>
        <p style="padding-bottom: 33px;font-size: 20px;font-weight: bold">¡Con gran alegría les damos la bienvenida por
            unirse a nosotros como uno de nuestros clientes, colegas de trabajo o proveedores de MF!</p>
        <div class="footer-right company-contact-box" style="width: 100%;">
            <div class="frist company-contact">
                <a href="/"><span>Elegant Mexican Flooring, S.A.DE C.V.</span></a>
                <p>Dirección: <strong>Nexxus ADN2, 65559 Ciénega de Flores, Nuevo León, México</strong></p>
                <p>Servicios de talento humano: <strong>mf-hr@eletile.com</strong></p>
                <p>Atención al cliente/Venta: <strong>Duoyuan.hu@eletile.com</strong></p>
            </div>
            <div class="frist-border company-contact-divider"></div>
            <div class="second company-contact">
                <a href="https://americanflooring.us"><span>American Flooring LLC</span></a>
                <p>Página web:<strong> https://americanflooring.us/</strong></p>
                <p>Dirección:<strong> 160-180 Independence Dr, Pittston, PA, USA, 18640</strong></p>
                <p> Contacto:<strong> Sunjian@eletile.com</strong></p>
            </div>
            <div class="frist-border company-contact-divider"></div>
            <div class="third company-contact">
                <a href="http://en.eletile.com"><span>Elegant Home-Tech Co., Ltd.</span></a>
                <p>Página web: <strong>http://eletile.com/</strong></p>
                <p>Dirección: <strong>Calle de Hexing, pueblo de Jinfeng, ciudad de Zhangjiagang, provincia de Jiangsu,
                    China, 215626</strong></p>
                <p>Contacto: <strong>Sales@eletile.com</strong></p>
            </div>
        </div>
    </div>
    <div class="footer-copy">
        <div class="container clearfix" style="text-align: center;font-size: 12px;color: #909399;">
            Copyright © 2024 Elegant Mexican Flooring, S.A.DE C.V.
        </div>
    </div>
</div>

<!-- 聊天窗口 -->
<!--<div class="chat-widget">-->
<!--    &lt;!&ndash; 聊天图标 &ndash;&gt;-->
<!--    <div class="chat-icon" id="chatIcon">-->
<!--        <i class="fas fa-comments"></i>-->
<!--    </div>-->

<!--    &lt;!&ndash; 聊天窗口 &ndash;&gt;-->
<!--    <div class="chat-window" id="chatWindow">-->
<!--        <div class="chat-header">-->
<!--            <h4>Asistente Virtual ELETILE</h4>-->
<!--            <button class="close-btn" id="closeChat">&times;</button>-->
<!--        </div>-->
<!--        <div class="chat-messages" id="chatMessages">-->

<!--        </div>-->
<!--        <div class="chat-input-container">-->
<!--            <div class="chat-input-wrapper">-->
<!--                <input type="text" class="chat-input" id="userInput" placeholder="Palabras claves...">-->
<!--                <button class="send-button" id="sendMessage">-->
<!--                    <i class="fas fa-paper-plane"></i>-->
<!--                </button>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->

<!-- 添加 Font Awesome 图标库 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<script src="static/js/jquery.waypoints.min.js"></script>
<!--<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>-->
<script src="static/js/jquery.countup.min.js"></script>
<script src="./static/js/player.js" type="text/javascript"></script>
<!-- 引入 libphonenumber-js 库 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/libphonenumber-js/1.9.22/libphonenumber-js.min.js"></script>
<!--<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/noty/3.1.4/noty.min.js"></script>
<script>
  $(document).ready(function () {
    // 展开/折叠表单部分
    $('.form-section').click(function () {
      $(this).toggleClass('expanded')
      let icon = $(this).find('.section-icon')
      icon.text($(this).hasClass('expanded') ? '-' : '+')
    })

    // // 表单提交处理
    // $('#contactForm').submit(function (e) {
    //   e.preventDefault()
    //   // 这里添加表单提交逻辑
    //   alert('Gracias por su mensaje. Nos pondremos en contacto con usted pronto.')
    // })
  })
</script>

<script type="module">
    import { baseUrl } from './static/js/config.js';
    // 表单提交处理
    document.addEventListener('DOMContentLoaded', function () {
        const form = document.getElementById('contactForm');

        form.addEventListener('submit', function (e) {
            e.preventDefault(); // 阻止表单默认提交行为

            let isValid = true;
            var $button = $('#submitButton');
            // 添加 loading 类
            $button.addClass('loading').prop('disabled', true).text('En proceso...');
            // 检查所有必填字段
            const requiredFields = form.querySelectorAll('[required]');
            requiredFields.forEach(field => {
                if (!field.value.trim()) {
                    isValid = false;
                    field.classList.add('error'); // 添加错误样式
                    alert(`Por favor, complete el campo: ${field.previousElementSibling.textContent.replace(' (requerido)', '')}`);
                } else {
                    field.classList.remove('error'); // 移除错误样式
                }
            });


            // 如果所有必填字段都已填写，则提交表单
            if (isValid) {
                // 收集表单数据
                const formData = new FormData(form);
                const data = {};
                formData.forEach((value, key) => {
                    data[key] = value;
                });

                const countryCode = document.getElementById('country').value;
                const phoneInput = document.getElementById('phone').value;
                const phoneNumber = libphonenumber.parsePhoneNumberFromString(phoneInput, countryCode);

                const customInput = document.getElementById('customInput');
                data.customerType = data.customerType + customInput.value.trim()
                data.phone = phoneNumber.formatInternational()


                // // 发送表单数据（示例：使用 fetch API）
                // fetch('http://10.1.12.110:10010/website/websiteSubmit', {
                //     method: 'POST',
                //     headers: {
                //         'Content-Type': 'application/json',
                //     },
                //     body: JSON.stringify(data),
                // })
                //     .then(response => response.json())
                //     .then(data => {
                //         if (data.success) {
                //             alert('Gracias por su mensaje. Nos pondremos en contacto con usted pronto.');
                //             form.reset(); // 重置表单
                //             // 清空表单
                //             document.getElementById('contactForm').reset();
                //             document.getElementById('customInput').style.display = 'none'; // 隐藏自定义输入框
                //         } else {
                //             alert('Hubo un error al enviar el formulario. Por favor, inténtelo de nuevo.');
                //         }
                //     })
                //     .catch(error => {
                //         console.error('Error:', error);
                //         alert('Hubo un error al enviar el formulario. Por favor, inténtelo de nuevo.');
                //     });


                // 发送表单数据（使用 AJAX）
                $.ajax({
                    url: `${baseUrl}/website/websiteSubmit`,
                    type: 'POST',
                    contentType: 'application/json',
                    data: JSON.stringify(data),
                    success: function(response) {
                        if (response.status === 200) {
                            $('#contactForm')[0].reset(); // 重置表单
                             document.getElementById('contactForm').reset();
                             document.getElementById('customInput').style.display = 'none'; // 隐藏自定义输入
                            $button.removeClass('loading').prop('disabled', false).text('Enviar');
                            // Swal.fire('Presentación exitosa!');
                            new Noty({
                                text: 'Presentación exitosa!',
                                type: 'success',
                                layout: 'topRight',
                                timeout: 3000
                            }).show();
                        } else {
                            console.error('Error:', textStatus, errorThrown);
                        }
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        console.error('Error:', textStatus, errorThrown);
                    }
                });
            }
        });

        // 显示自定义输入框
        function showCustomInput() {
            const customInput = document.getElementById('customInput');
            customInput.style.display = document.getElementById('customOption').checked ? 'block' : 'none';
        }

        // 绑定事件
        document.querySelectorAll('input[name="customerType"]').forEach(input => {
            input.addEventListener('change', showCustomInput);
        });
    });
</script>



</body>
</html>
